package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.DingBundleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author feng.zheng
 * @version v1.0
 * @date 2019/1/22 16:44
 * @since v1.0
 */
@Repository
@Mapper
public interface DingBundleDao {
    
    Integer insert(DingBundleEntity dingBundleEntity);

    Integer update(DingBundleEntity dingBundleEntity);

    DingBundleEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    List<DingBundleEntity> findEntitys(@Param("param") Map<String, Object> param);
    
    DingBundleEntity getByOpenConversationId(@Param("corpid") String corpid, @Param("openConversationId") String openConversationId,@Param("del") Integer del);

    Integer dataConsistencyUpdateUser(@Param("corpid") String corpid, @Param("ownerId") String ownerId, @Param("name") String name, @Param("avatar") String avatar);

    DingBundleEntity getByType(@Param("corpid") String corpid, @Param("openConversationId") String openConversationId, @Param("type") Integer type, @Param("del") Integer del);
}
